package com.ctu.gzero.operation
{
	import com.ctu.gzero.edit.SelectionState;
	import com.ctu.gzero.elements.DOMElement;
	
	public class DomOperation
	{
		private var _dom:DOMElement;
		private var _originalSelectionState:SelectionState;
		private var _absoluteStart:int;
		private var _absoluteEnd:int;
		
		public function DomOperation(selectionState:SelectionState)
		{
			super();
			_dom = selectionState.dom;
			_originalSelectionState = selectionState;
			_absoluteStart = selectionState.absoluteStart;
			_absoluteEnd = selectionState.absoluteEnd;
			
		}
		
		public function get dom():DOMElement
		{
			return _dom;
		}
		
		public function get originalSelectionState():SelectionState
		{
			return _originalSelectionState;
		}
		
		public function get absoluteStart():int
		{
			return _absoluteStart;			
		} 
		
		public function get absoluteEnd():int
		{
			return _absoluteEnd;			
		}
		
		public function doOperation():SelectionState
		{
			return null;
		}		
		
		public function redo():SelectionState
		{
			return doOperation();
		}
		
		public function undo():SelectionState
		{
			return null;
		}

	}
}